package day03;

import sun.plugin.dom.html.ns4.NS4DOMObject;

public class yun2 {
    public static void main(String[] args) {
        //演示&&
        int a = 5,b= 10, c = 5;
        boolean b1 = b>a && b<c;
        System.out.println(b1);
        System.out.println(b<=c && c>b);
        System.out.println(a==b && c>b);
        System.out.println(b!=c && a<b);
        //演示||
        System.out.println(b>=a|| b<c);
        System.out.println(b<=c || b>a);
        System.out.println(b!=c || a<b);
        System.out.println(a==b || c>b);
        //演示！
        boolean b2 = !(a<b);
        System.out.println(b2);
        System.out.println(c);
        //演示&&的短路
        int a1 = 5,b3 =10,c2=5;
        boolean ba = a1>b3 && c++>2;
        System.out.println(ba);
        System.out.println(c2);
        //演示||的短路
        boolean b4 = a<b || c2++>2;
        System.out.println(b4);
        System.out.println(c2);
    }
}
